public class test {
    public static void main(String[] args) {
        for (int i = 2; i <= 100; i++) {
            int j;
            for(j = 2;j <= Math.sqrt(i);j++) {
                if(i % j == 0) {
                    break;
                }
            }
            if(j > Math.sqrt(i)) {
                System.out.print(i + " ");
            }
        }
    }
}
